package com.gzh.teaching.service.dto;

import com.gzh.core.dao.po.QuestionEntity;
import com.gzh.core.util.StringUtils;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
@NoArgsConstructor
public class GetWorkInfo {
  private Integer questionId;
  private String questionName;
  private String questionType;
  private String selectA;
  private String selectB;
  private String selectC;
  private String selectD;
  private String answer;
  private String analyzeText;
  private String answerId;
  private String userAnswer;
  private String result;

  public GetWorkInfo(QuestionEntity t) {
    this.questionId = t.getQuestionId();
    this.questionName = t.getQuestionName();
    this.questionType = StringUtils.toString(t.getQuestionType());
    this.selectA = t.getSelectA();
    this.selectB = t.getSelectB();
    this.selectC = t.getSelectC();
    this.selectD = t.getSelectD();
    this.answer = t.getAnswer();
    this.userAnswer = "";
    this.analyzeText = t.getAnalyzeText();
  }
}
